package com.example {

import flexunit.framework.TestCase;
import flexunit.framework.TestSuite;

public class TempConverterTest extends TestCase {

  /**
   * Ensures the celsius to fahrenheit conversion works as expected.
   */
  public function testToFahrenheit():void {
    // Test boiling point
    var celsius:Number = 100;
    var fahrenheit:Number = TempConverter.toFahrenheit(celsius);
    assertTrue("Expecting 212 fahrenheit", fahrenheit == 212);

   			// Test freezing point
    celsius = 0;
    fahrenheit = TempConverter.toFahrenheit(celsius);
    assertTrue("Expecting 32 fahrenheit", fahrenheit == 32);
  }

  /**
   * Ensures the fahrenheit to celsius conversion works as expected.
   */
  public function testToCelsius():void {
    // Test boiling point
    var fahrenheit:Number = 212;
    var celsius:Number = TempConverter.toCelsius(fahrenheit);
    assertTrue("Expecting 100 celsius", celsius == 100);

   			// Test freezing point
    fahrenheit = 32;
    celsius = TempConverter.toCelsius(fahrenheit);
    assertTrue("Expecting 0 celsius", celsius == 0);
  }

}
}